Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
cli-handle-error
Advanced tools
Custom error handler for Node CLIs
npm install node-cli-handle-error
const handleError = require('cli-handle-error');
// Let's say we get an error message from a custom command.
const [err, res] = await somePromise();
// Use the function. It will print the error and exit if there is an error.
handleError(`Failed while building on step #1`, err);
Type: string
Heading of the error message.
Type: error/object
Type: boolean
Default: true
(optional)
Display the error message or not.
Type: boolean
Default: true
(optional)
Exit the CLI on error or not?
KEY: 📦 NEW
, 👌 IMPROVE
, 🐛 FIX
, 📖 DOC
, 🚀 RELEASE
, and ✅ TEST
I use Emoji-log, you should try it and simplify your git commits.
(follow) To stay up to date on free & open-source software
(follow) To get #OneDevMinute daily hot tips & trolls
(subscribe) To tech talks & #OneDevMinute videos
Me (Ahmad Awais) and my incredible wife (Maedah Batool) are two engineers who fell in love with open source and then with each other. You can read more about me here. If you or your company use any of my projects or like what I’m doing then consider backing me. I'm in this for the long run. An open-source developer advocate.
Or you can back me by checking out my super fun video course. As developers, we spend over 200 Hrs/month with our code editors — it's only fair to learn your next editor deeply. This course will save you 15-20 hours every month. Become a VSCode Power User →
FAQs
Custom error handler for Node.js CLIs.
The npm package cli-handle-error receives a total of 62,075 weekly downloads. As such, cli-handle-error popularity was classified as popular.
We found that cli-handle-error demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.